
import Data.List
import System(getArgs)

frequencies :: [Float] -> [(Int, Int)]
frequencies dists =
    [ (0, length $ filter (<= 10) dists') ] ++
    [ (i, length $ filter (inRange i) dists') | i <- [1..9] ]
    where
      dists' :: [Int]
      dists' = map (\x -> truncate (x * 100)) dists

      inRange :: Int -> Int -> Bool
      inRange i x = 10 * i < x && x <= 10 * (i + 1)

printRange :: (Int, Int) -> IO ()
printRange (i, f) = putStrLn $ range ++ " " ++ show f
    where
      range :: String
      range = show (perc i) ++ "%-" ++ show (perc $ i + 1) ++ "%"

      perc :: Int -> Int
      perc i = (i * 100) `div` 10

main :: IO ()
main = do args <- getArgs
          s <- getContents
          let dists = map read $ words s :: [Float]
          mapM_ printRange (frequencies dists)